package fields;
import game.Player;

public class OwnableChance extends Chancekort {
	
	protected Player owner = new Player();
	
	public OwnableChance (int chancebonus, int chancenumber, String eventyr)
	{
		super (chancebonus, chancenumber, eventyr);
		owner=null;
	}

	public boolean isNotOwnable()
	{
		if (owner==null) return true;
		else return false;
	}
	
	public void setOwner(Player s)
	{
		owner=s;
	}
	
	public boolean isOwner(Player p)
	{
		if (getOwner().compareTo(p.getName())==0) return true;
		else return false;
	}
	
	public String getOwner()
	{
		return owner.getName();
	}
	
	public void forSale()
	{
		owner=null;
	}
	
	

	public void havingCard(Player s)
	{
					setOwner(s);
					
		}
	
	
	
	
	
	}
	
	

